-- GENERATED SPELL FOR [Scourge Reanimator] --


function spell0_26626(pUnit, Event) --@Cripple,n/a--
pUnit:FullCastSpellOnTarget(50379,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_26626', 11500, 1)
end

function spell1_26626(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(50378,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_26626', 5500, 1)
end

function spell2_26626(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(59017,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_26626', 5500, 1)
end

function spell3_26626(pUnit, Event) --@Unholy Frenzy,n/a--
pUnit:FullCastSpellOnTarget(49805,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_26626', 15000, 1)
end

function Sorts_26626(pUnit, Event)
local choix_sorts_26626 = math.random(0, 3)
if choix_sorts_26626 == 0 then
pUnit:RegisterEvent('spell0_26626', 1, 1)
end
if choix_sorts_26626 == 1 then
pUnit:RegisterEvent('spell1_26626', 1, 1)
end
if choix_sorts_26626 == 2 then
pUnit:RegisterEvent('spell2_26626', 1, 1)
end
if choix_sorts_26626 == 3 then
pUnit:RegisterEvent('spell3_26626', 1, 1)
end
end

function mob26626_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_26626', math.random(1500, 3000), 1)
end

function mob26626_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob26626_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob26626_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(26626, 1, 'mob26626_Action')
RegisterUnitEvent(26626, 2, 'mob26626_Leave')
RegisterUnitEvent(26626, 3, 'mob26626_Kill')
RegisterUnitEvent(26626, 4, 'mob26626_Die')
